<template>
	<div>
		<Header></Header>
		<router-view></router-view>
		<Footer v-if="!$route.meta.isHidden"></Footer>
	</div>
</template>

<script>
import Header from "@/components/Header";
import Footer from "@/components/Footer";
import { mapActions } from "vuex";
export default {
	name: "App",
	components: {
		Header,
		Footer,
	},
	mounted() {
		// console.log(this);
		//初始化TypeNav的三级分类数据,防止公共组件多次使用的时候,进行多次请求
		this.getCategoryList();
	},
	methods: {
		...mapActions("category", ["getCategoryList"]),
	},
};
</script>

<style></style>
